var express = require('express');
var ejs=require('ejs');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('哈哈');
});

router.get('/changsha', function(req, res, next) {
  var str = `
  	这是我的信息，我叫<%=name%>今年<%=age%>岁了
  	<style>
  		body{
  			background:pink;
  		}

  	</style>
  	<script>
  		alert("haha");
  	</script>
  `;

var result=ejs.render(str,{name:"如花",age:29});
//console.log(result);

res.send(result);
});
module.exports = router;